from django.conf.urls.defaults import *
from django.conf import settings

# forum management
urlpatterns = patterns('djangobb.forums.views',
    # view forum
    (r'^forums/$',                       'mainpage'), # 1st page of forums
    (r'^forums/(\d+)/$',                 'mainpage'), # nth page of forums
    (r'^forums/viewforum/(\d+)/$',       'viewforum'),# 1st page of topics in a forum 
    (r'^forums/viewforum/(\d+)/(\d+)/$',  'viewforum'), # nth page of topics in a forum
    (r'^forums/viewtopic/(\d+)/$',       'viewtopic'), # 1st page
    (r'^forums/viewtopic/(\d+)/(\d+)/$', 'viewtopic'), # nth page of the topic

    # add posts
    (r'^forums/newforum/$',              'newforum'),
    (r'^forums/newtopic/(\d+)/$',        'newtopic'),
    (r'^forums/newpost/(\d+)/$',         'newpost'),
    # delete posts
    (r'^forums/deleteforum/(\d+)/$',     'deleteforum'),
    (r'^forums/deletetopic/(\d+)/$',     'deletetopic'),
    (r'^forums/deletepost/(\d+)/$',      'deletepost'),
)

# user management
urlpatterns += patterns('djangobb.users.views',
    (r'^users/login/$',        'login'),
    (r'^users/logout/$',       'logout'),
    (r'^users/signup/$',       'signup'),
    (r'^users/viewprofile/$',  'viewprofile'),
    (r'^users/chprofile/$',    'chprofile'),
    (r'^users/passwdrst/$',    'passwdrst'),
    (r'^users/chpasswd/$',     'chpasswd'),
)

